#ifndef __NET_H_
#define __NET_H_

#include "_header.h"

#ifndef WIN32
typedef int EventHandle;
#define INVALID_HANDLE	(-1)

#define IOCANCELED	(ECANCELED)

#define EPOLL_SIZE	(2048)
#define EPOLLNUM	(128)

#else

#pragma comment(lib,"WS2_32.lib")


#ifdef FD_SETSIZE
#undef FD_SETSIZE
#endif
#define FD_SETSIZE 1024

 
#include <Winsock2.h>
#include <Windows.h>

typedef SOCKET EventHandle;
#define INVALID_HANDLE	(INVALID_SOCKET)

#define IOCANCELED	(ERROR_OPERATION_ABORTED)

typedef int socklen_t;

#endif

#endif